import React, { PureComponent } from 'react'
import {
    View,
    Text,
    StyleSheet
} from 'react-native'
import Style from '../utils/style/style'
export default class CellItem extends PureComponent {
    constructor(props) {
        super(props)
    }
    render() {
        const {title,content,noBorder } = this.props
        return (
            <View style={[styles.cellWrap]}>
                <View style={[styles.cell,noBorder?styles.noBorder:'']}>
                    <View  style={styles.label}>
                        <Text  style={styles.text}>{title}</Text>
                    </View>
                    <View  style={Style.flex1}>
                        <Text  style={styles.text}>{content}</Text>
                    </View>
                </View>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    cellWrap:{
        width: Style.width,
        height:46,
        // backgroundColor:''
    },
    cell:{
        marginLeft:10,
        flex:1,
        borderStyle:'solid',
        borderColor:'#e5e5e5',
        borderBottomWidth:1,
        flexDirection:'row',
        alignItems:'center'
    },
    noBorder:{
        borderBottomWidth:0,
    },
    label:{
        width:105,
    },
    text:{
        fontSize:17,
        color:'#000'
    }

})